﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="TableMapping.cs" company="CodePlex">
//   Copyright © CodePlex 2012
// </copyright>
// <summary>
//   Defines the TableMapping type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DataFramework.Attributes
{
    using System;

    /// <summary>
    /// Attribute that maps an object to a table in the database.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class TableMapping : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TableMapping"/> class.
        /// </summary>
        /// <param name="tableName">Name of the table.</param>
        public TableMapping(string tableName)
        {
            this.TableName = tableName;
        }

        /// <summary>
        /// Gets or sets the name of the table.
        /// </summary>
        /// <value>The name of the table.</value>
        public string TableName { get; set; }
    }
}
